import { createWebHashHistory,createWebHistory, createRouter } from 'vue-router'

import Trial from '@/view/Trial.vue' //引入组件路径（路由组件尽量放在view文件夹下）
import Home from '@/view/Home.vue'
import Element from '@/view/Element.vue'
import MavonEditor from '@/view/MavonEditor.vue'

const routes = [
    { path: '/', component: Home}, // 默认访问路径
    { path: '/home', component: Home},
    { path: '/trial',component: Trial },
    { path: '/element',component: Element },
    { path: '/mavon',component: MavonEditor },
]

const router = createRouter({
    // history: createWebHashHistory(),//hash的模式，如#/home，#/center  带#号的路径
    history: createWebHistory(),//web的模式，如/home，/center  不带#号的路径
    routes,//`routes:routes`的缩写
})

export default router
